﻿using System;
using System.Collections.Generic;

using WAF.EntityFramework;

namespace TradeCore.Model.Entity
{
    /// <summary>
    /// CTP经纪商
    /// </summary>
    public class CtpBroker : WAF.EntityFramework.Entity
    {
        [EntityField(1, label: "经纪商代码", isDisplay: true, isNullable: false)]
        public string BrokerCode { get; set; }

        [EntityField(2, label: "经纪商名称", isDisplay: true, isNullable: false)]
        public string BrokerName { get; set; }

        [EntityField(3, label: "备注", isDisplay: true)]
        public string Remark { get; set; }
    }

    /// <summary>
    /// CTP账号
    /// </summary>
    public class CtpAccount : WAF.EntityFramework.Entity
    {
        [EntityField(1, label: "账号", isDisplay: true, isNullable: false)]
        public string Account { get; set; }

        [EntityField(2, label: "密码", isDisplay: true, isNullable: false)]
        public string Password { get; set; }

        [EntityField(3, label: "经纪商ID", isDisplay: true, isNullable: false)]
        public string BrokerID { get; set; }

        [EntityField(4, label: "备注", isDisplay: true)]
        public string Remark { get; set; }
    }

    /// <summary>
    /// 交易记录
    /// </summary>
    public class TradeRecord : WAF.EntityFramework.Entity
    {
        [EntityField(1, label: "交易时间", isDisplay: true, isNullable: false)]
        public string TradeTime { get; set; }

        [EntityField(2, label: "交易策略", isDisplay: true, isNullable: false)]
        public string Policy { get; set; }

        [EntityField(3, label: "交易市场", isDisplay: true, isNullable: false)]
        public string Market { get; set; }

        [EntityField(4, label: "交易账号", isDisplay: true, isNullable: false)]
        public string Account { get; set; }

        [EntityField(5, label: "交易品种", isDisplay: true, isNullable: false)]
        public string Code { get; set; }

        [EntityField(6, label: "交易方向", isDisplay: true, isNullable: false)]
        public string Direction { get; set; }

        [EntityField(7, label: "交易数量", isDisplay: true, isNullable: false)]
        public int Volume { get; set; }

        [EntityField(8, label: "交易价格", isDisplay: true, isNullable: false)]
        public double Price { get; set; }
    }
}
